package com.lyf.boot.modules.user.entity;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.lyf.boot.annotation.ExcelDictFormat;
import com.lyf.boot.convert.ExcelDictConvert;
import lombok.Data;

import java.time.LocalDate;

/**
 * @author Luyufan
 * @date 2023/7/4 13:37
 */
@Data
@ExcelIgnoreUnannotated
public class UserExcel {

    @ExcelProperty(value = "用户名")
    private String username;

    @ExcelProperty(value = "地址")
    private String address;

    @ExcelProperty(value = "状态", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "0=禁用,1=正常")
    private Integer status;

    @ExcelProperty(value = "性别", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "gender")
    private String gender;

    @ExcelProperty(value = "生日")
    private LocalDate birthday;

    private String realName;

}
